class Solution {
public:
    string getSmallestString(string s)
    {
        for (int i = 1; i < s.size(); i++)
        {
            if ((s[i - 1] - '0') % 2 == (s[i] - '0') % 2 && s[i] < s[i - 1])
            {
                swap(s[i], s[i - 1]);
                break;
            }
        }
        return s;
    }
};